package com.hybrid.config;

/**
 * 在此写用途
 *
 * @author: zhiwei
 * @date: 2017-10-08 22:48
 * @version: 9.1.0
 */
public class GlobalConfig {
    public static final String VERSION = "1.0.0";
    public static final String DEFAULT_UA = "android/OpenWeb/"+VERSION;
    private static GlobalConfig config;

    /**
     * 应用名
     */
    public String appName;
    /**
     * 应用版本
     */
    public String appVersion;

    /**
     * 分辨率 宽度
     */
    public int width;
    /**
     * 封边率 高度
     */
    public int height;

    public void initParam(WVAppParams params) {
        appName = params.appName;
        appVersion = params.appVersion;
        width = params.width;
        height = params.height;
    }



    public synchronized static GlobalConfig getInstance() {
        if (config == null) {
            config = new GlobalConfig();

        }
        return config;
    }

    public String getAppName() {
        return appName;
    }

    public String getAppVersion() {
        return appVersion;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }
}
